package com.senven.api.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.senven.api.commom.ResponsePage;
import com.senven.api.dao.RoleMapper;
import com.senven.api.pojo.OrganUser;
import com.senven.api.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author LQP
 */
@Service
public class RoleService {
    @Autowired
    private RoleMapper roleMapper;

    public  ResponsePage<Role> queryRoleList(int current, int size){
        Page<Role> page = new Page<Role>(current, size);
        QueryWrapper<Role> wrapper = new QueryWrapper<Role>();

        IPage<Role> iPage = roleMapper.selectPage(page,null);
        ResponsePage<Role> responsePage= new ResponsePage<Role>();
        responsePage.makePage(iPage);

        return responsePage;
    }
}
